﻿<%@ Page Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="JobTitles.aspx.cs" Inherits="ETestIT.UI.JobTitles" Title="Untitled Page" %>
<%@ Register TagPrefix="uc1" TagName="JobTitleAddEdit" Src="~\AppControls\JobTitleAddEdit.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2 id="PageTitle"><%= Title %></h2>
    <asp:LinkButton ID="createNewJobTitle" Text="add new" runat="server" OnClick="BtnCreateNewJobTitle_Clicked" />
    <br/><br/>
    <div>
        <asp:GridView ID="gvJobTitles" runat="server" AutoGenerateColumns="False" class="easygrid" >
            <Columns>
               <asp:BoundField DataField="Name" HeaderText="Name"/>
               <asp:TemplateField HeaderText = "Actions">
                    <ItemTemplate>
                        <asp:LinkButton 
                                ID="lbtnEditJobTitle" 
                                runat="server" 
                                Text="Edit"
                                CommandName="JobTitleEdit" 
                                CommandArgument='<%#Eval("Id")%>' 
                                OnCommand="LnkEditCommand"/>
                        <asp:LinkButton 
                                ID="lbtnDeleteJobTitle" 
                                runat="server" 
                                Text="Delete"
                                CommandName="JobTitleDelete" 
                                CommandArgument='<%#Eval("Id")%>' 
                                OnCommand="LnkEditCommand"/>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <br />
    <div>
        <uc1:JobTitleAddEdit runat="server" Id="jobTitleAddEdit" Visible="false" />
    </div>
</asp:Content>
